/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2025-03-27
 * Time: 23:24
 */

// 动物基类：所有动物的公共属性和行为

class Animal {
    private String name;

    public Animal(String name) {
        this.name = name;
    }

    // 动物进食的公共行为
    public void eat() {
        System.out.println(name + "正在吃东西...");
    }

    public String getName() {
        return name;
    }
}